#ifndef GRAPH_H_
#define GRAPH_H_

#include <iostream>
#include <fstream>
#include <vector>
#include <utility>
#include <math.h>

#include "myDefine.h"
#include "edaSerialize.h"

class Graph : public edaSerialize
{
  public:
    Graph();
    // Copy constructor
    Graph(const Graph &g);
    ~Graph();

    Graph* clone();

    void load(const char *fileName);
    float distance(unsigned int from, unsigned int to);
    unsigned int size();
    Graph& operator = (Graph &g);

    void Serialize(edaBuffer &buf, bool pack);

    setClassID(_USERCLASSID_ + _CLSID_GRAPH_);

  private:
    void computeDistances();

    std::vector<std::pair <double, double> > vectCoord;
    std::vector<std::vector <unsigned int> > dist;
};

#endif /*GRAPH_H_*/
